home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GFX Sensations 1
/
Graphic Sensations - Volume 1.iso
/
tools
/
amiga
/
gfx_card
/
pap12pat.lha
/
PAP12patch.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-09-26
|
4KB
|
166 lines
/* Update Part And Particle v1.1 to v1.2 */
/* */
/* ©1994 Carmen Rizzolo */
/* */
Options Results
Address Command
Quote = "'"
Say
Say
If Exists('OpalPaint:Rexx/PAP11.oprx') = 0 Then Do
Say 'I cannot seem to find the Part And Particle v1.1 file!'
Say 'Perhaps you need to first upgrade from 1.0 to 1.1'
If Exists('Rexx:PAP11.oprx') = 0 Then Do
Say 'Nope. Definently not there. Exiting...'
Exit
End
End
If Exists('OpalPaint:Rexx/PAP11.oprx') = 1 Then Say 'PAP11.oprx found in OpalPaint:Rexx/'
If Exists('Rexx:PAP11.oprx') = 1 & Exists('OpalPaint:Rexx/PAP11.oprx') = 0 Then Say 'Okay, there it is... In Rexx:'
If Exists('OpalPaint:Rexx/PAP11.oprx') = 1 Then PAPDir = 'OpalPaint:Rexx/'
Else If Exists('Rexx:PAP11.oprx') = 1 Then PAPDir = 'Rexx:'
Say
Say
Say 'WARNING! Your PAP11.oprx file MUST be the original, unmodified file'
Say 'that came from your PAP installation, or unmodified from the upgrade'
Say 'patch that brought you from 1.0 to 1.1. Shall I continue? (y/n)'
Pull YesNo
If UPPER(Left(YesNo,1)) ~= 'Y' Then Do
Say
Say 'Operation aborted.. Have a nice day.'
Exit
End
Say
Say
Say 'Stand By: Upgrading...'
'Copy ' || PAPDir || 'PAP11.oprx Ram: Quiet'
Call Open('PAP11File','Ram:PAP11.oprx','r')
Do A = 1 to 350
AA = ReadLn('PAP11File')
End
If Right(AA,25) ~= '"Part And Particle v1.1"' || Quote Then Do
Say 'FATAL ERROR! It appears that this is NOT Part And Particle'
Say 'version 1.1! Either that or the file has been modified.'
Say 'Please re-install Part And Particle from the original disks'
Say 'before trying this script again. Exiting...'
Exit
End
Call Close('PAP11File')
Call Open('PAP11File','Ram:PAP11.oprx','r')
Call Open('PAP12File','Ram:PAP12.oprx','w')
Call WriteLn('PAP12File','/* */')
Call WriteLn('PAP12File','/* Part and Particle v1.2 */')
Do A = 1 to 2
AA = ReadLn('PAP11File')
End
Do A = 1 to 347
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
AA = ReadLn('PAP11File')
NewLine = ' AddHeading ' || Quote || 'CenterX 20 "Part And Particle v1.2"' || Quote
Call WriteLn('PAP12File',NewLine)
Do A = 1 to 1606
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
NewLine = ' Do ProjNum = 1 to 21'
Call WriteLn('PAP12File',NewLine)
AA = ReadLn('PAP11File')
Do A = 1 to 39
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
NewLine = ' If ProjectCount > 20 then Do'
Call WriteLn('PAP12File',NewLine)
AA = ReadLn('PAP11File')
Do A = 1 to 6
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
NewLine = ' Do P = 1 to ProjectCount'
Call WriteLn('PAP12File',NewLine)
AA = ReadLn('PAP11File')
Do A = 1 to 27
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
NewLine = ' Do P = 1 to ProjectCount'
Call WriteLn('PAP12File',NewLine)
AA = ReadLn('PAP11File')
Do A = 1 to 63
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
NewLine = ' If ProjNum = 21 Then Do'
Call WriteLn('PAP12File',NewLine)
NewLine = ' Okay ' || Quote || 'This was the 20th Project. Time to move on.' || Quote
Call WriteLn('PAP12File',NewLine)
NewLine = ' TotalProjects = 20'
Call WriteLn('PAP12File',NewLine)
Do A = 1 to 3
AA = ReadLn('PAP11File')
End
Do A = 1 to 57
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
NewLine = ' Return TotalProjects Proj.1 Proj.2 Proj.3 Proj.4 Proj.5 Proj.6 Proj.7 Proj.7 Proj.8 Proj.9 Proj.10 Proj.11 Proj.12 Proj.13 Proj.14 Proj.15 Proj.16 Proj.17 Proj.18 Proj.19. Proj.20'
Call WriteLn('PAP12File',NewLine)
AA = ReadLn('PAP11File')
Do A = 1 to 2018
AA = ReadLn('PAP11File')
Call WriteLn('PAP12File',AA)
End
Call Close('PAP11File')
Call Close('PAP12File')
Say '...done'
If Exists('OpalPaint:Rexx/') = 1 Then 'Copy Ram:PAP12.oprx ' || PAPDir || ' QUIET'
Delete 'Ram:PAP11.oprx Quiet'
Delete 'Ram:PAP12.oprx Quiet'
Say
Say 'Operation complete!'
Say 'PAP12.oprx (Part And Particle v1.2) is now in your'
Say PAPDir || ' directory.'
Say
Say 'Exiting...'
Exit